package com.wzqj.agent.web.domain;

import java.util.Date;

import com.wzqj.wsp.encrypt.MD5;
/**
 * 用户表
 * @author gz
 *
 */
public class User {

	/**
	 * 主键
	 */
	private Integer id;
	/**
	 * 账号
	 */
	private String username;
	/**
	 * 密码
	 */
	private String password;
	/**
	 * 角色主键
	 */
	private Integer roleId;//0：超级管理员 1：一级代理商 2 ：二级代理商 3：业务员
	/**
	 * 用户类型
	 */
	private int type;//(0:超级管理员 1:代理商 2:业务员)
	/**
	 * 用户类型主键
	 */
	private Integer typeId;//0:超级管理员 其他：代理商或业务员的主键
	/**
	 * 用户状态
	 */
	private int status;//(1:正常 0:冻结)
	/**
	 * 创建时间
	 */
	private long createTime = new Date().getTime();
	
	/**
	 * @return the id
	 */
	public Integer getId() {
		return id;
	}
	/**
	 * @param id the id to set
	 */
	public void setId(Integer id) {
		this.id = id;
	}
	/**
	 * @return the username
	 */
	public String getUsername() {
		return username;
	}
	/**
	 * @param username the username to set
	 */
	public void setUsername(String username) {
		this.username = username;
	}
	
	/**
	 * @return the password
	 */
	public String getPassword() {
		return password;
	}
	/**
	 * MD5加密处理
	 * @param password the password to set
	 */
	public void setPassword(String password) {
//		byte[] pwBts= password.getBytes();
//		if (pwBts!=null&&pwBts.length>0) {
//			this.password  = MD5.getMD5(pwBts);
//		}
		this.password = password;
	}
	/**
	 * @return the roleId
	 */
	public Integer getRoleId() {
		return roleId;
	}
	/**
	 * @param roleId the roleId to set
	 */
	public void setRoleId(Integer roleId) {
		this.roleId = roleId;
	}
	/**
	 * @return the type
	 */
	public int getType() {
		return type;
	}
	/**
	 * @param type the type to set
	 */
	public void setType(int type) {
		this.type = type;
	}
	/**
	 * @return the typeId
	 */
	public Integer getTypeId() {
		return typeId;
	}
	/**
	 * @param typeId the typeId to set
	 */
	public void setTypeId(Integer typeId) {
		this.typeId = typeId;
	}
	/**
	 * @return the status
	 */
	public int getStatus() {
		return status;
	}
	/**
	 * @param status the status to set
	 */
	public void setStatus(int status) {
		this.status = status;
	}
	/**
	 * @return the createTime
	 */
	public long getCreateTime() {
		return createTime;
	}
	/**
	 * @param createTime the createTime to set
	 */
	public void setCreateTime(long createTime) {
		this.createTime = createTime;
	}
	
	
}
